package com.wenjie.springbootbugdetection.service.impl;

import com.wenjie.springbootbugdetection.mapper.SubmitterMapper;
import com.wenjie.springbootbugdetection.model.Submitter;
import com.wenjie.springbootbugdetection.service.SubmitterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Yang wenjie
 * @date 2021/7/6 16:11
 * Nice to Meet you!
 */
@Service
public class SubmitterServiceImpl implements SubmitterService {
    @Autowired
    private SubmitterMapper submitterMapper;

    @Override
    public Submitter selectSubmitter(Integer submitterId) {
        return submitterMapper.selectByPrimaryKey(submitterId);
    }

    @Override
    public List<Submitter> select_All_Submitters() {
        return submitterMapper.selectAllSubmitters();
    }

    @Override
    public Integer deleteSubmitter(Integer id) {
        return submitterMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateASubmitter(Submitter submitter) {
        return submitterMapper.updateByPrimaryKeySelective(submitter);
    }

    @Override
    public int insertASubmitter(Submitter submitter) {
        return submitterMapper.insert(submitter);
    }
}
